tinyMCE.init({

mode : "specific_textareas",
language: "zh-cn",
plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,anchor,cleanup,code,|,insertdate,inserttime,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,advhr,|,print,|,ltr,rtl",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,image,link,unlink,preview,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
width: "100%",
height: "600",
file_browser_callback: 'openKCFinder',
convert_urls: false
});

function openKCFinder(field_name, url, type, win) {
		    tinyMCE.activeEditor.windowManager.open({
		    	 file: 'include/kcfinder/browse.php?opener=tinymce&lang=zh-cn&type='+type,//kcfinder路径
				 title: '选择文件',
		         width: 700,
		         height: 500,
		         resizable: "yes",
		         inline: true,
		         close_previous: "no",
		        popup_css: false
		    }, {
		        window: win,
		        input:field_name
		    });
		    return false;
		}